package com.qf.j2105.service.impl;

import com.qf.j2105.mapper.GoodMapper;
import com.qf.j2105.po.Good;
import com.qf.j2105.service.GoodService;
import com.qf.j2105.vo.GoodVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsServiceImpl implements GoodService {
    @Resource
    private GoodMapper goodMapper;

    @Override
    public List<GoodVO> findGoods() {
        return goodMapper.findAll();
    }

    @Override
    public List<Good> likeGoos(String name) {
        name = "%" + name + "%";
        System.out.println(name);
        List<Good> goods = goodMapper.likeName(name);
        return goods;
    }
}
